package at.ac.tuwien.swa.sparrow.server.security

import java.net.HttpURLConnection
import org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor

object AuthenticatingHttpInvokerRequestExecutor extends SimpleHttpInvokerRequestExecutor {

	var properties = Map.empty[String, Any]

	override def prepareConnection(connection: HttpURLConnection, contentLength: Int): Unit = {
		super.prepareConnection(connection, contentLength)
		properties foreach (p => connection.setRequestProperty(p._1, p._2.toString))
	}
}
